Skip to content

Conversation

@harshtandiya
Copy link
Collaborator

@harshtandiya harshtandiya commented Feb 8, 2026

Summary by CodeRabbit

  • Chores

    • Added automated frontend TypeScript type checking in CI and a local typecheck task for development.
    • Updated TypeScript configuration and added typings so Vue single-file components are recognized.
  • Refactor

    • Minor internal type and parameter cleanups to improve type safety and code hygiene (no user-facing behavior changes).

- Introduced a new script for TypeScript type checking in package.json.
- Updated tsconfig.json to skip library checks for improved build performance.
- Introduced a new GitHub Actions workflow for TypeScript type checking in the frontend application.
- The workflow triggers on pushes and pull requests to the develop branch, ensuring type safety during development.
- Configured steps for checking out the code, setting up Node.js, installing dependencies, and running type checks.
@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

Warning

Rate limit exceeded

@harshtandiya has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 40 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Adds frontend TypeScript type-checking: new GitHub Actions workflow, a typecheck script and helper shell script, TypeScript config and ambient Vue SFC declaration; minor frontend code edits (router param renames, small store type/cast and import adjustments, a TS ignore insertion).

Changes

Cohort / File(s) Summary
CI/CD workflow
\.github/workflows/typecheck.yml
New "Frontend TypeScript" GitHub Actions workflow triggered on pushes to develop and PRs touching frontend or the workflow; sets Node 24, caches Yarn (frontend/yarn.lock), installs frontend deps with frozen lockfile, then runs the frontend typecheck.
Frontend scripts & helper
frontend/package.json, frontend/typecheck.sh
Added typecheck script in frontend/package.json that invokes ./typecheck.sh. typecheck.sh runs tsc --noEmit, filters diagnostics to show relevant errors (excluding node_modules) and exits nonzero on errors.
TypeScript configuration & types
frontend/tsconfig.json, frontend/types.d.ts
Updated lib to include ES2022, added types.d.ts to include, excluded node_modules; added ambient module declaration for *.vue exporting DefineComponent<{}, {}, any> so Vue SFC imports are typed.
Router param rename
frontend/src/router.ts
Renamed unused route-guard parameter from from to _from in two places (no logic change).
Store type/import tweaks
frontend/src/stores/editForm.ts, frontend/src/stores/editSubmission.ts, frontend/src/stores/user.ts
editForm: imported FormFieldTypes and cast new field's fieldtype to it. editSubmission: removed unused createResource import. user: changed create_team onSuccess handler to parameterless, added a // @ts-ignore`` around getCurrentTeamFromAllTeams helper access (no runtime behavior changes).

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Runner as Runner
    participant Repo as Repository
    participant Node as Node.js (v24)
    participant Yarn as Yarn
    participant TSC as TypeScript Compiler

    GH->>Runner: workflow triggered (push/PR)
    Runner->>Repo: checkout repository
    Runner->>Node: setup Node.js v24
    Runner->>Yarn: restore/cache deps (frontend/yarn.lock)
    Runner->>Repo: install frontend deps (frozen lockfile)
    Runner->>Repo: run `yarn typecheck` (frontend)
    Runner->>TSC: execute `tsc --noEmit`
    TSC-->>Runner: emit diagnostics
    Runner->>Runner: filter diagnostics (exclude node_modules)
    Runner-->>GH: report workflow status (success/failure)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇
I hopped into the build today,
I chased lost types and bugs away,
I cached my crumbs and ran the test,
Now Vue files nap and errors rest,
CI hums on—I've earned my hay.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change—adding TypeScript compilation checking to the CI pipeline via a new GitHub Actions workflow and supporting configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.github/workflows/typecheck.yml:
- Around line 7-13: The path filters in the workflow use the wrong prefix
("apps/forms_pro/frontend/**") so the workflow never triggers; update both
occurrences under push.paths and pull_request.paths to the actual repo location
("frontend/**") while keeping the workflow file itself
(".github/workflows/typecheck.yml") in the list; modify the paths arrays in the
typecheck.yml triggers to replace "apps/forms_pro/frontend/**" with
"frontend/**" so frontend changes correctly trigger the workflow.
- Around line 33-41: The workflow references non-existent paths; update the
cache-dependency-path and the two working-directory fields used in the "Install
dependencies" and "Type check" steps to the correct frontend directory by
replacing "apps/forms_pro/frontend" with "frontend" (ensure
cache-dependency-path: frontend/yarn.lock and both working-directory: frontend),
and scan the same workflow for any other occurrences of
"apps/forms_pro/frontend" to update them similarly.

In `@frontend/tsconfig.json`:
- Line 23: The tsconfig contains a stray top-level "skipLibCheck" property that
is ignored; remove the top-level "skipLibCheck" entry and ensure the existing
compilerOptions.skipLibCheck value (in the "compilerOptions" object) is the
single source of truth; locate the top-level "skipLibCheck" key and delete it so
only "compilerOptions.skipLibCheck" remains.

- Simplified paths in the GitHub Actions typecheck workflow to target the frontend directory directly.
- Adjusted working directories for dependency installation and type checking to reflect the new structure.
- Changed the TypeScript library target from ES2020 to ES2022 in tsconfig.json for improved features.
- Updated the include paths in tsconfig.json to include types.d.ts and added an exclude rule for node_modules.
- Replaced the typecheck command in package.json with a new script (typecheck.sh) that filters out errors from node_modules.
- Introduced typecheck.sh to streamline type checking and ignore irrelevant errors from third-party libraries.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@frontend/package.json`:
- Line 11: The typecheck step currently runs tsc --noEmit (referenced in the
"typecheck" script and typecheck.sh) which doesn't type-check Vue SFCs; install
vue-tsc as a devDependency and update typecheck.sh (and the "typecheck" script
if it invokes tsc) to run vue-tsc --noEmit instead of tsc --noEmit so .vue
<script lang="ts"> blocks are properly type-checked.
🧹 Nitpick comments (1)
frontend/typecheck.sh (1)

5-5: Grep filter may miss errors from files outside src/.

The pattern ^(src/|error TS) only captures error lines whose file path starts with src/. Errors originating from other project files (e.g., types.d.ts itself, or any future top-level .ts files) would be silently dropped.

Consider broadening the filter to exclude only node_modules rather than allowlisting src/:

Suggested fix
-ERRORS=$(echo "$OUTPUT" | grep -E "^(src/|error TS)" | grep -v "node_modules/")
+ERRORS=$(echo "$OUTPUT" | grep -E "(error TS)" | grep -v "node_modules/")

"build": "vite build --base=/assets/forms_pro/frontend/ && yarn copy-html-entry",
"preview": "vite preview",
"lint": "biome check --write .",
"typecheck": "./typecheck.sh",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n frontend/package.json

Repository: BuildWithHussain/forms_pro

Length of output: 1500


🏁 Script executed:

cat -n frontend/typecheck.sh

Repository: BuildWithHussain/forms_pro

Length of output: 568


🏁 Script executed:

rg 'vue-tsc' frontend/

Repository: BuildWithHussain/forms_pro

Length of output: 52


Use vue-tsc instead of tsc to type-check .vue files.

Plain tsc --noEmit only checks .ts/.tsx files; it cannot parse or type-check Vue SFCs. Your current typecheck.sh uses tsc --noEmit, which means any type errors in <script lang="ts"> blocks in .vue files are silently ignored. This is a Vue 3 + TypeScript project, so vue-tsc is the correct tool.

  1. Add vue-tsc as a dev dependency.
  2. Replace tsc --noEmit with vue-tsc --noEmit in typecheck.sh.

Without this, the CI typecheck step provides a false sense of safety — the codebase can have undetected type errors in Vue components.

🤖 Prompt for AI Agents
In `@frontend/package.json` at line 11, The typecheck step currently runs tsc
--noEmit (referenced in the "typecheck" script and typecheck.sh) which doesn't
type-check Vue SFCs; install vue-tsc as a devDependency and update typecheck.sh
(and the "typecheck" script if it invokes tsc) to run vue-tsc --noEmit instead
of tsc --noEmit so .vue <script lang="ts"> blocks are properly type-checked.

- Added missing FormFieldTypes import in editForm store for better type safety.
- Updated router beforeEnter and beforeEach hooks to use a consistent parameter naming convention.
- Cleaned up trailing commas in computed properties and function calls for improved readability.
- Removed unused import in editSubmission store to streamline code.
- Updated package.json to include vue-tsc for enhanced type checking capabilities.
- Modified typecheck.sh to utilize vue-tsc instead of tsc, streamlining the type checking process.
- Updated yarn.lock to reflect new dependencies and versions for better compatibility.
- Added `<!-- @vue-ignore -->` comments in Attachment.vue and AccessSection.vue to suppress TypeScript warnings.
- Updated Dashboard.vue to remove unnecessary template parameters for improved clarity.
- Added a TypeScript ignore comment in socket.ts to suppress warnings related to the import of socketio_port from the configuration file.
@harshtandiya harshtandiya merged commit 6040b1e into develop Feb 10, 2026
6 checks passed
@harshtandiya harshtandiya deleted the ci branch February 10, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant